/*

class Base{
    int a;
    int b;

}

*/
/*class Drived extends Base{
    int c;
    public void methods(){
        //访问父类中的成员变量
        a = 10;
        b = 20;
        c = 30;
    }
}*//*



class Derived extends Base {
    int a;
    int b;

    public void methods() {
        //访问父类中的成员变量
        super.a = 10;
        super.b = 20;
    }
}

public class test1 {
    public static void main(String[] args) {
        Derived derived = new Derived();
        Base base = new Base();
        derived.methods();//进行赋值
        System.out.println(derived.a);//看看子类的变化
        System.out.println(derived.b);
        System.out.println(base.a);//再看看父类的变化
        System.out.println(base.b);
    }
    //运行结果为
    //10
    //20
    //0
    //0
}
*/
